﻿import QtQuick 2.15

Rectangle{
    width: parent.width
    height: width/6
    color: "#ffffff"

    Rectangle{
        id: barBottomLine
        width: parent.width
        height: 1
        color: "#f0f0f0"
        anchors.top: parent.bottom

    }

    Image {
        id: personPortrait
        width: parent.width/10
        height: width
        anchors.verticalCenter: parent.verticalCenter
        anchors.left: parent.left
        source: "qrc:/img/setport.png"
        anchors.leftMargin: parent.height*0.4
    }


    Text {
        id: userName
        text: qsTr("修改端口>>")
        anchors.right: parent.right
        anchors.top: parent.top
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
        font.family: "Arial"
        font.pointSize: 12
        anchors.rightMargin: parent.height*0.4
        anchors.topMargin: parent.height*0.4

    }


    MouseArea{
        anchors.fill: parent
        hoverEnabled: true

        onClicked: {

            changePortLoader.children[0].visible = true
            console.log("SetRectBarComponent is clicked...")

        }

        onCanceled: {
           parent.color =  "#ffffff"
           cursorShape = Qt.ArrowCursor
        }

        onEntered:
        {
            parent.color =  "#f0f0f0"
            cursorShape = Qt.PointingHandCursor
        }

        onExited: {
            parent.color =  "#ffffff"
            cursorShape = Qt.ArrowCursor
        }

    }
}



